package com.ruyuan.dfs.common;

import com.ruyuan.dfs.server.NettyPacket;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;

/**
 * @description:
 * @Author gckj
 * @Email:
 * @Date: 2024/8/2 14:09
 * @Version 1.0
 */
public class NettyPacketEncoder extends MessageToByteEncoder<NettyPacket> {
    @Override
    protected void encode(ChannelHandlerContext ctx, NettyPacket msg, ByteBuf out) throws Exception {
        msg.write(out);
    }
}
